package com.bestcem.xm.component.mybatis.base;

import com.fasterxml.jackson.annotation.JsonProperty;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.util.Collections;
import java.util.List;

/**
 * 分页通用返回结果
 *
 * @author zq.ding <zq.ding@idiaoyan.com>
 * @version v1.0
 * @date 2021/8/18 18:22
 */
@Data
public class ResultPage<T> {

    @JsonProperty("page")
    @ApiModelProperty(value = "当前页号")
    private Number page;

    @JsonProperty("rows")
    @ApiModelProperty(value = "数据行")
    private List<T> data = Collections.emptyList();

    @JsonProperty("total_count")
    @ApiModelProperty(value = "记录总数")
    private Number total;
}
